﻿package mortal.component.skin.button
{
    import com.mui.controls.*;
    import com.mui.core.*;
    import com.mui.display.*;
    import com.mui.skins.*;
    import fl.controls.*;
    import fl.core.*;
    import flash.geom.*;
    import flash.text.*;
    import mortal.common.*;
    import mortal.common.font.*;
    import mortal.component.gconst.*;

    public class RedButtonStyle extends SkinStyle
    {
        private var _component:UIComponent;
        private var _scaleRect:Rectangle;
        private var _textFormat:TextFormat;
        private var _diableTextFormat:TextFormat;

        public function RedButtonStyle()
        {
            this._scaleRect = new Rectangle(15, 10, 10, 10);
            this._textFormat = new GTextFormat(FontUtil.defaultName, 13, 16764044);
            this._diableTextFormat = new GTextFormat(FontUtil.defaultName, 13, 8158332);
            return;
        }// end function

        override public function setStyle(param1:UIComponent) : void
        {
            this._component = param1;
            var _loc_2:* = GlobalClass.getScaleBitmap("RedButton_upSkin", this._scaleRect);
            var _loc_3:* = GlobalClass.getScaleBitmap("RedButton_overSkin", this._scaleRect);
            param1.setStyle("upSkin", _loc_2);
            param1.setStyle("downSkin", _loc_2);
            param1.setStyle("overSkin", _loc_3);
            param1.setStyle("disabledSkin", _loc_3);
            param1.setStyle("textFormat", this._textFormat);
            param1.setStyle("disabledTextFormat", this._diableTextFormat);
            param1.setStyle("textPadding", 0);
            param1.setStyle("selectedUpSkin", _loc_3);
            param1.setStyle("selectedDownSkin", _loc_3);
            param1.setStyle("selectedOverSkin", _loc_3);
            (param1 as Button).textField.filters = [FilterConst.buttonDropShadowFilter, FilterConst.buttonGlowFilter];
            (param1 as GButton).paddingTop = 4;
            return;
        }// end function

    }
}
